<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="sidebar-collapse">
        <ul class="nav metismenu" id="side-menu">
            <li class="nav-header">
                <div class="dropdown profile-element" style="text-align:center">
                    <img alt="头像" style="width:50px;cursor:pointer;" class="rounded-circle" src="{$user.avatar|default='/static/inspinia/img/profile_small.jpg'}" onclick="location.href='{:url(\'user/profile\')}'"/>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span class="block m-t-xs font-bold">{$user.name|default=''}</span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li><a class="dropdown-item" href="{:url('user/profile',['id'=>$user['id']])}">个人信息</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a class="dropdown-item" href="{:url('login/logout')}">登出</a></li>
                    </ul>
                </div>
                <div class="logo-element">
                    IN+
                </div>
            </li>
            {$menu|raw}
            <li>
                <a target="_blank" href="https://www.baidu.com">
                    <i class="fa fa-search"></i><span class="nav-label">百度</span>
                </a>
            </li>
        </ul>
    </div>
</nav>